//2009/08/29 19:54:39
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <math.h>
#include <sstream>
#include <algorithm>

using namespace std;

class Subway2
{
public:
    double minTime(int length, int maxAcceleration, int maxVelocity)
    {
		double t = 1.0 * maxVelocity / maxAcceleration;
		double stemp = 1.0 * maxAcceleration * t * t;
		if(stemp >= length) return 2.0 * sqrt(1.0 * length / maxAcceleration);
		else return 2.0 * t + 1.0 * (length - stemp) / maxVelocity;
    }
};
